<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <title>Facelet Title</title>
    </h:head>
    <h:body>
        <ui:composition template="/templates/default.xhtml">
            <ui:define name="content">
                <h:form>
                    <h:panelGrid id="panelNewStudprog" columns="2" title="#{locale.formStudprogInfo}" >
                        <f:facet name="header">
                            <h:outputText value="#{locale.formStudprogInfo}"/>
                         </f:facet>
                        <h:outputLabel value="#{locale.formCode}" />
                        <h:inputText value="#{newStudyProgram.newStudprog.studyProgramCode}" size="20"  />

                        <h:outputLabel value="#{locale.formName}" />
                        <h:inputText value="#{newStudyProgram.newStudprog.name}" size="20"  />

                        <h:outputLabel value="#{locale.formApproved}" />
                        <h:inputText value="#{newStudyProgram.newStudprog.approved}" size="20"  >
                            <f:convertDateTime pattern="yyyy-MM-dd"/>
                        </h:inputText>

                        <h:outputLabel value="#{locale.formApprovedBy}" />
                        <h:inputText value="#{newStudyProgram.newStudprog.approvedBy}" size="20"  />

                        <h:outputLabel value="#{locale.formRevised}" />
                        <h:inputText value="#{newStudyProgram.newStudprog.lastRevised}" size="20"  >
                            <f:convertDateTime pattern="yyyy-MM-dd"/>
                        </h:inputText>

                        <h:outputLabel value="#{locale.formDepartment}" />
                        <h:selectOneMenu value="#{newStudyProgram.newStudprog.department.departmentID}">
                                <f:selectItem itemLabel="#{locale.selectDepartment}" itemValue=""/>
                                <f:selectItems value="#{newStudyProgram.departments}" var="dep" itemLabel="#{dep.name}" itemValue="#{dep.departmentID}"/>
                        </h:selectOneMenu>

                        <h:outputLabel value="#{locale.formIsNKR}" />
                        <h:selectBooleanCheckbox value="#{newStudyProgram.newStudprog.isNKR}" />
                    </h:panelGrid>
                    <h:commandButton value="#{locale.buttonAdd}" action="#{newStudyProgram.executeNewStudyProgram}" />
                </h:form>
            </ui:define>
        </ui:composition>
    </h:body>
</html>

